function CreateIfNotExists($path) {  
    if (!(Test-Path $path)) {  
        New-Item -ItemType Directory -Path $path | Out-Null  
        Write-Host "create path success：$path"  
    } else {  
        Write-Host "path is exist：$path"  
    }  
}  
  
$PATH_DICT = @{  
    'env' = @('maven', 'node', 'anaconda')  
    'dev' = @('docker')  
    'software' = @('yuque', 'TenCentVideo', 'WYmusic', 'snipaste','Vscode','sougou','wps','sublime','finalshell','火绒','sourcetree')
    'code' = @('git','project') 
    'temp' = @() 
}  
  
$ROOT_PATH = "F:\"  
  
if (!(Test-Path $ROOT_PATH)) {  
    New-Item -ItemType Directory -Path $ROOT_PATH | Out-Null  
    Write-Host "create path success：$ROOT_PATH"  
} else {  
    Write-Host "path is exist：$ROOT_PATH"  
}  
  
foreach ($key in $PATH_DICT.Keys) {  
    $tempPath = Join-Path $ROOT_PATH $key  
    CreateIfNotExists $tempPath  
    Write-Host "$key $($PATH_DICT[$key])"  
    foreach ($item in $PATH_DICT[$key]) {  
        $fullPath = Join-Path $tempPath $item  
        CreateIfNotExists $fullPath  
        Write-Host $item  
    }  
    Write-Host '---------------------------'  
}